package com.wawayaya.db.entitydao;


import android.util.Log;

import com.wawayaya.bean.User;
import com.wawayaya.db.DBManager;
import com.wawayaya.db.basedao.UserDao;

public class UserEntityDao extends BaseEntityDao<UserDao,User, Long> {

	@Override
	protected UserDao initEntityDao() {
		return DBManager.newSession().getUserDao();
	}

	public void deleteEntityByKey(Long key) {
		getEntityDao().deleteByKey(key);
	}

	@Override
	public void replaceEntity(User entity) {
		Log.e("WFNY","传入的参数："+entity.toString());
		getEntityDao().insertOrReplace(entity);
	}

	@Override
	public User queryEntityByWhere(String where, String... selectionArg) {
		return super.queryEntityByWhere(where, selectionArg);
	}
}
